URL encoder and decoder
Percent-encode text for use in URLs, decode encoded URLs, and see every part of a URL at a glance.
Paste a full URL (starting with https://) to see its parts and parameters.
How it works
Anatomy of a URL
https://user@example.com:8080/docs/page?lang=en&q=json#intro
- Protocol:
https: - User info:
user@(rare, and a security risk in links) - Host and port:
example.com:8080 - Path:
/docs/page - Query:
?lang=en&q=json, a list of name=value pairs - Fragment:
#intro, which stays in the browser and is never sent to the server
Characters that need encoding
Letters, digits and - _ . ~ are always safe. Characters with a special meaning, such as ? & = # /, must be encoded when they're part of a value, and everything else (spaces, accented letters, emoji) is encoded as UTF-8 bytes.
More tools
More on the bench
JSON formatter and validatorPretty-print, minify and validate JSON, with the exact line of any error. Base64 encoder and decoderEncode text to Base64 and back, including URL-safe Base64 and emoji. CSV to JSON converterConvert CSV to JSON and JSON to CSV, with delimiter detection. UUID generatorGenerate random v4 or time-ordered v7 UUIDs, one or a hundred at a time. JWT decoderRead the header and claims of a JSON Web Token, with expiry dates in plain English. Hash generatorSHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text.
Frequently asked questions
When should I encode a value and when a full URL?
Encode a value (encodeURIComponent) for anything you put inside a URL, such as a search term or parameter value: it escapes & = ? / and # too. Encode a full URL (encodeURI) only for a complete address that may contain spaces or non-English characters, which keeps its structure intact.
Why do spaces sometimes become + and sometimes %20?
Both mean a space. %20 is standard percent-encoding; + is used for spaces in HTML form submissions (application/x-www-form-urlencoded). The decoder here treats + as a space, which is right for query strings.
What does percent-encoding do?
It replaces characters that aren't allowed or have special meaning in URLs with a % followed by their UTF-8 bytes in hexadecimal. A space becomes %20, é becomes %C3%A9 and € becomes %E2%82%AC.
Is my URL sent anywhere?
No. Encoding, decoding and parsing all happen in your browser. That is important for URLs with tokens or personal data in them.