URL Encoder
Encode text for URLs.
About this tool
Paste text and get it percent-encoded for use as a single URL component, such as a query-string value. It uses encodeURIComponent, so characters like / ? & = # and spaces are all escaped. Do not paste a whole URL expecting it to stay usable.
How to use
How it works
Every character except A-Z a-z 0-9 and - _. ! ~ * ' ( ) is replaced by %XX, using the UTF-8 bytes of the character. A space becomes %20, not +. Because reserved characters are escaped too, encode a value, not a full URL.
Worked example
A URL used as a parameter value
- Input
- https://example.com/search?q=a b&lang=fr
- Output
- https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Da%20b%26lang%3Dfr
- Walkthrough
- : / ? = & and the space are all escaped, which is what you want when this whole URL is the value of another URL's parameter such as ?redirect=.
Limitations
- Escapes reserved characters, so encoding a full URL breaks its structure.
- Spaces become %20; form-style + encoding is not produced.
Questions
How do I URL-encode a string?
Why is / turned into %2F?
Is a space %20 or +?
Does it encode non-English text?
Features
- encodeURIComponent behavior
- UTF-8 aware
- Runs in your browser
Guides
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
How base64 encoding works
Andrew Schmelyun
Clear mental model for Base64 tools and data-URL workflows.
Watch on YouTubeLearn Regular Expressions - Crash Course
freeCodeCamp.org
Regex primer for tester and explainer pages.
Watch on YouTube
- encodeURIComponent()
MDN
What browser URL encoding actually does—maps to url-encode tools.
- RFC 4648 — Base16, Base32, and Base64
IETF
Standards reference for Base64 alphabet and padding rules.