What is URL encoding?
URLs are only allowed to contain a limited set of characters. Spaces, ampersands, question marks, slashes and any non-ASCII letters can change how a link is parsed — or break it entirely. URL encoding (also called percent-encoding) replaces each unsafe character with a % followed by its hex byte value, sohello world becomes hello%20world and café becomes caf%C3%A9. Decoding reverses the process to recover the original text.
How to use it
- Encode: paste your text — a query value, a path segment or a full string — into the input and press Encode →.
- Decode: paste a percent-encoded string into the input and press Decode ← to read it back.
- Copy the result with one click and drop it straight into your URL, API request or config file.
This tool uses the browser's standard encodeURIComponent and decodeURIComponent, which escape everything that isn't safe inside a single URL component (such as one query-string value). That's the right choice when you're building a value to slot into a larger URL.
When you need it
Anyone working with the web hits URL encoding constantly: building query strings by hand, debugging an API call that returns the wrong result, sharing a search link with special characters, or storing a redirect target inside another URL. Encoding makes the value travel safely; decoding lets you read a captured URL that's full of %20 and%2F noise.
Is it private?
Yes. URLs sometimes carry tokens, session IDs, email addresses or other data you'd rather not hand to a random server. ToolFern runs entirely locally in your browser — the page does the encoding with built-in JavaScript andnever uploads your text. You can even use it offline once the page has loaded.
Frequently asked questions
Does it support Unicode and emoji?
Yes — percent-encoding is UTF-8 based, so accents, emoji and other non-ASCII characters round-trip correctly.
Why did decoding show an error?
Decoding fails if the input contains a malformed percent sequence, like a lone % or %ZZ. Check that every % is followed by two valid hex digits.
Is this the same as Base64?
No. URL encoding only escapes unsafe characters and stays mostly readable; Base64 rewrites data into a 64-character alphabet. For Base64, use our separate Base64 tool.