URL Encode / Decode
URL encode or decode text online: percent-encode query string values and full URLs, or turn %20-style escapes back into readable text.
Runs in your browser · Nothing uploadedFree · No sign-up
Something not working, or missing a feature? Send feedback
About the URL Encode / Decode
URLs may only contain certain characters; everything else must be percent-encoded. This tool encodes or decodes whole URLs or individual query values and handles UTF-8 correctly. URL encode mode works like JavaScript's encodeURIComponent (or encodeURI for a full URL), so a space becomes %20, and URL decode mode turns an encoded URL back into readable text: paste something like caf%C3%A9%20menu and get café menu.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the URL Encode / Decode
- Choose Encode or Decode.
- Pick whether you are encoding a full URL or a single component (such as a query value).
- Optionally write spaces as +, then copy the result.
Examples
Input
red shoes & bags/50% off
Result
red%20shoes%20%26%20bags%2F50%25%20off
Encoded as a component, so &, / and % are escaped and the value cannot break the query string. Spaces become %20.
Input
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcaf%C3%A9%26page%3D2
Result
https://example.com/search?q=café&page=2
In Decode mode, %C3%A9 is read as UTF-8 and becomes é.
Common mistakes
- Encoding twice. Encoding an already encoded value turns %20 into %2520. If a URL shows %25, it was double-encoded; decode once.
- Encoding a whole URL as a component. Component mode escapes : and /, which breaks a full URL. Use it for one parameter value, and full-URL mode for a complete address.
- A + in a decoded value. In form-encoded query strings + means a space, but elsewhere it is a literal plus. Encode a real plus as %2B so it survives both.
Works well with the URL Encode / Decode
- URL Parser: split a URL into parts and decode every parameter.
- Base64 Encode / Decode: encode binary or JSON data for a URL.
- HTML Entity Encode / Decode: escape a URL before putting it in HTML.
Frequently asked questions
Component or full URL?
Encode a single query value as a component so characters like & and = are escaped. Encoding a full URL keeps its structure characters intact.
Should spaces be %20 or +?
In query strings from HTML forms spaces are +; elsewhere %20 is the standard. Choose to match what the receiving server expects.
What is the difference from encodeURIComponent?
Component mode gives the same result as JavaScript’s encodeURIComponent, and full-URL mode matches encodeURI.
Which characters never need encoding?
Letters, digits and - _ . ~ are always safe. Everything else is safe only in some parts of a URL, so encode it when in doubt.
Guides and tutorials
- Security & Encoding
URL Encoding Explained: Percent-Encoding, encodeURIComponent and Common Bugs
How percent-encoding works, when to use encodeURIComponent vs encodeURI, why + sometimes means a space, and how to fix double encoding and broken query strings.
· 6 min read
- Web Development
How QR Codes Work: Error Correction, Size and Scanning Best Practices
What the squares in a QR code mean, how error correction levels work, why long URLs make dense codes, and how big to print a QR code so every phone can scan it.
· 6 min read
- Security & Encoding
Unicode and UTF-8 Explained: Why String Length Lies
Code points, UTF-8 bytes, UTF-16 code units and graphemes: why an emoji has length 2 in JavaScript, how mojibake happens, and how to count and compare text.
· 5 min read
- Security & Encoding
What Is Base64 Encoding? How It Works and When to Use It
How Base64 turns bytes into text, why it adds 33% to the size, Base64 vs Base64URL, handling UTF-8 in JavaScript, and why Base64 is never encryption.
· 7 min read
Related tools
Base64 Encode / Decode
Decode Base64 to text or encode text to Base64 online, with full UTF-8 and URL-safe Base64 support. Conversion runs in your browser, so nothing is uploaded.
HTML Entity Encode / Decode
Encode special characters as HTML entities or decode entities such as & and < back to text. Escape user content safely before adding it to a page.
JWT Decoder & Verifier
Paste a JWT to decode its header and payload instantly, read exp and iat as dates and verify HS256 signatures. Tokens are decoded locally, never uploaded.
JWT Generator
Create signed JSON Web Tokens online with HS256, HS384 or HS512 from a custom header and payload. Signing happens in your browser; the secret stays local.
Unicode Escape / Unescape
Convert text to \uXXXX Unicode escape sequences and back online, including emoji and astral characters. Handy for JavaScript, JSON and Java strings.
JSON Escape / Unescape
Escape text for use inside a JSON string, or unescape stringified JSON back to readable text. Handles quotes, backslashes, line breaks and Unicode escapes.