URL Encoder
URL encoder for the browser. Percent-encode strings for use in URLs — component values or full URLs, UTF-8 safe, with form-style + or strict %20 for spaces.
Text in, percent-encoded out
Reserved and non-ASCII characters become %XX escapes. Unicode is UTF-8 encoded first, then each byte becomes one %XX triplet.
Hello, world!
Hello%2C%20world%21
What you'll use this for
Percent-encoding turns reserved and unsafe characters into a portable %XX form that survives URLs, query strings, and form posts.
Query strings
Encode values for URL query strings.
Path segments
Encode file or folder names safely.
Form data
Encode form data for application/x-www-form-urlencoded.
API URLs
Build API URLs from user input.
How to URL-encode text
Paste your text
Drop it into the left editor. Unicode is fine — it's UTF-8 encoded first, then each byte becomes a %XX triplet.
Pick mode
Component for values inside a URL, Full URL to keep :/?#[]@, Strict to escape every non-alphanumeric.
Click Encode
Or leave auto-encode on for live updates. Runs locally — no upload.
Copy or download
Copy to clipboard or save as .txt. Or jump straight to the decoder for round-trip checks.
Frequently asked questions
encodeURIComponent escapes everything not alphanumeric — for values inside a URL. encodeURI preserves :/?#[]@ — for whole URLs.
Yes. UTF-8 bytes are percent-encoded.
Yes.
application/x-www-form-urlencoded uses + for spaces; URL paths use %20. Toggle Space.
About URL encoding
Percent-encoding (RFC 3986) is the standard mechanism for representing characters in a URI that are outside the small unreserved set A-Z a-z 0-9 - _ . ~. Every other byte becomes a triplet of the form %XX, where XX is the byte's hexadecimal value. Non-ASCII characters are first encoded as UTF-8 and then each byte is percent-encoded individually.
How encoding works
- Unreserved characters pass through unchanged.
- Reserved and unsafe characters are replaced with
%XX. - Unicode is UTF-8 encoded first, so a single character can expand to several
%XXtriplets.
When to use which mode
- Component (
encodeURIComponent) — values placed inside a URL: query-string values, path segments built from user input, fragment text. Escapes:/?#[]@too. - Full URL (
encodeURI) — when you have an entire URL to clean up and need to preserve the structure delimiters:/?#[]@. - Strict — paranoid mode that escapes every non-alphanumeric byte, useful for filenames or environments with quirky parsers.
Spaces, plus signs, and forms
- In URL paths and query values, spaces must be
%20. - In
application/x-www-form-urlencoded(HTML form posts), spaces are encoded as+. Toggle Space to switch between the two.