Developer Tools
URL Encode / Decode
Percent-encode text for URLs and query strings, or decode %20-style encoded URLs back into readable text.
How to use
- 1Choose Encode or Decode and the scope.
- 2Paste your text or URL and copy the result.
Frequently asked questions
What's the difference between encoding a component and a full URL?
Component mode encodes everything except letters, digits and - _ . ! ~ * ' ( ). Full-URL mode leaves characters like : / ? & = intact.
Should spaces be %20 or +?
%20 is correct everywhere. + means a space only in HTML form data (application/x-www-form-urlencoded); enable the option for that.
Why does decoding fail?
A % must be followed by two hex digits. A stray % (like '100%') makes the input invalid — encode it as %25.
A worked example showing why scope matters
Encode a b&c=d/é as a component and every special character gets escaped: a%20b%26c%3Dd%2F%C3%A9 — the & and = are encoded because encodeURIComponent treats them as literal characters to protect, not query-string syntax. Encode the full URL https://x.com/a b?q=1&r=é in "Full URL" scope instead, and you get https://x.com/a%20b?q=1&r=%C3%A9 — the : / ? & = characters that make the URL structurally valid are left alone, while the space and the accented é still get escaped. Using component encoding on a full URL would wrongly escape its own ? and & and break it; the two modes exist because encoding "a value going into a URL" and "a URL as a whole" are genuinely different operations.
Why %20 and + aren't interchangeable
Percent-encoding is a general mechanism (RFC 3986) where %20 always means a literal space, valid anywhere in a URL. The + for space convention is specific to one encoding format — application/x-www-form-urlencoded, which is what browsers use for classic HTML form submissions — and a parser that isn't expecting that format will take a literal + character at face value. The toggle exists specifically for reproducing that form-encoding behavior; leave it off unless you know you're building a string destined for form-encoded data.
Why a stray % breaks decoding outright
Percent-encoding's rule is strict: a % must always be followed by exactly two hexadecimal digits. The string "100%" fails decoding here precisely because that trailing % isn't followed by two hex digits — it's not percent-encoding syntax at all, just a literal percent sign that itself needed to be encoded as %25 to survive the round trip. This is a common real bug source: any text containing a raw % (prices, percentages) needs to be encoded before it goes into a URL, or decoding it later throws exactly this error.
The scope menu hides while I am decoding
Mode opens on encode. Scope opens on query value, and that menu is hidden as soon as I switch to decode. Spaces as + starts off. While encoding, turning it on replaces each encoded space with a plus, so a space becomes a plus rather than %20, while a percent sign I typed is still encoded and is not rewritten into a plus. While decoding, the same switch turns plus signs into spaces before the percent sequences are read, so a plus that was meant as a plus becomes a space. A percent sign that is not followed by two hex digits stops the whole decode. The message says every % must be followed by two hex digits, and I do not get a partial result.
Related tools
- Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text, with full UTF-8 support and a URL-safe option.
- HTML Entity Encoder / Decoder
Escape <, >, & and quotes as HTML entities, or decode named and numeric entities (&, ©, 😀) back to text.
- SQL Formatter
Format and beautify SQL queries for PostgreSQL, MySQL, SQL Server, SQLite, BigQuery and more, with uppercase keywords.
- JSONPath Tester
Query JSON with JSONPath expressions like $.store.book[*].author or $..price and see every match with its exact path.
- String Escape / Unescape
Escape or unescape strings for JavaScript, JSON, HTML, XML, SQL, CSV and regular expressions — quotes, backslashes and newlines handled.
- Image to Base64 / Data URI Converter
Convert images to Base64 data URIs for HTML, CSS and JSON — or paste Base64 to preview and download the image. Runs in your browser.