URL Encode/Decode
URL-encode or decode instantly in your browser — auto-detects whether you pasted plain text or a percent-encoded string, so there's no mode switch to think about.
What Is URL Encoding?
URL (or "percent") encoding replaces characters that aren't safe inside a URL — spaces, &, ?, #, non-ASCII letters, and more — with a % followed by their hex byte value. hello world becomes hello%20world; café becomes caf%C3%A9. It keeps a URL parseable when the data inside it (a search query, a redirect target, a file name) contains characters that would otherwise be mistaken for part of the URL's own structure.
Decoding reverses the process, turning %20 back into a space and so on.
Why Encode URLs?
Reserved characters like & and = already mean something specific in a URL (separating query parameters, for example). If a value you're putting into a query string contains one of those characters unencoded, it can silently break the URL or get parsed as a different parameter than you intended. Encoding removes the ambiguity.
How This Tool Works
Paste text or a percent-encoded string into the box below and click the button. This tool automatically detects which direction you need — if your input contains %XX sequences that decode successfully, it decodes them; otherwise, it encodes your input. Everything runs in your browser; nothing is uploaded to any server.
Raw Text vs. URL-Encoded Text
| Feature | Raw Text | URL-Encoded Text |
|---|---|---|
| Spaces | Literal space | %20 (or + in query strings) |
| Reserved characters (&, ?, #, =) | Literal, can break URL parsing | Escaped as %XX |
| Non-ASCII characters (é, 日本語, emoji) | Literal | UTF-8 bytes, each escaped as %XX |
| Safe to embed in a query string | Not always | Yes |
| Human readable | Yes | Harder to read at a glance |
Keep Text Raw When
- It's not going inside a URL at all
- It's already confirmed safe (plain ASCII letters, digits,
-,_,.,~)
URL-Encode Text When
- You're building a query string parameter by hand (
?redirect=+ encoded URL) - Your value might contain
&,=,#, spaces, or non-ASCII characters - You're debugging why a link with special characters isn't working as expected
Common Scenarios for URL Encoding/Decoding
Building a Redirect or Share Link by Hand
Query parameters like ?redirect=https://example.com/page?id=5 need the inner URL encoded first, or the second ? and = will be parsed as part of the outer URL instead of as data. This is common when linking to a file someone just processed — for example, a shareable link to a PDF produced with our PDF Merge tool.
Debugging a Broken Link
If a URL with spaces, accented characters, or symbols isn't working, decoding it here shows you exactly what the server is actually receiving — often revealing a missing or double-encoded character.
Reading a Server Log or Analytics Report
Web server logs and analytics tools often show request paths and query strings in their raw, encoded form. Decoding a logged URL here turns %3D and %26 back into = and & so you can read it normally.
Passing Data Through a Query String
APIs and web forms that accept parameters via the URL (rather than a request body) need any value that might contain reserved characters — a search term, an email address, a file path — encoded first so it survives the trip intact.
Constructing an API Request URL
When building a request URL manually (in a script, a curl command, or Postman), encoding path segments and query values ahead of time avoids malformed-request errors caused by unescaped special characters.
Other Ways to URL-Encode or Decode Text
You can also URL-encode or decode text using your browser's developer console (encodeURIComponent()/decodeURIComponent()), or a short script in your language of choice. FileCast is useful for a quick, one-off conversion without opening dev tools.
Frequently Asked Questions
Is my data uploaded anywhere?
No. Encoding and decoding both happen entirely in your browser — nothing is sent to any server.
How does the tool know whether to encode or decode?
It checks whether your input contains % followed by two hex digits (a percent-encoded sequence) and whether that decodes without error. If so, it decodes; otherwise, it treats your input as plain text and encodes it.
Why did my + turn into %2B instead of staying a space?
This tool uses encodeURIComponent, the standard for encoding individual values (query parameters, path segments). It represents a literal space as %20. Some older systems use + for spaces specifically inside application/x-www-form-urlencoded form bodies — a different, narrower convention this tool doesn't target.
Does this encode an entire URL, or just a value inside one?
It encodes whatever you paste as a single value — every reserved character gets escaped, including /, :, and ?. If you paste a full URL, those structural characters will be encoded too, not just the query string parts. To build a full URL, encode each value separately and assemble the URL around the encoded pieces.
Why does decoding sometimes fail with an error?
A malformed % sequence — like a stray % not followed by two valid hex digits, or a % sequence that doesn't form valid UTF-8 when several are combined — can't be decoded unambiguously. When that happens, the tool falls back to encoding your input instead of guessing.