URL encoder
URL-encode (percent-encode) any text so it's safe in links, query strings and API requests. Spaces, &, ?, # and accents handled. Free URL encoder.
Make any text safe to put in a URL
URLs can only contain a limited set of characters. Spaces, accented letters, emoji and symbols like &, ?, #, = and / either aren't allowed or have special meaning. URL encoding, also called percent-encoding, replaces those characters with a % followed by their hexadecimal byte value, so the text travels safely.
For example, coffee & tea becomes coffee+%26+tea, and café becomes caf%C3%A9 (its UTF-8 bytes). Paste your text, submit, and copy the encoded result.
Encoding matters most for values inside a query string. If a search term contains &, an unencoded link will split it into two parameters and break the request.
How to use the url encoder
- Paste the text or value you want to encode.
- Submit to encode it.
- Copy the encoded string.
- Insert it into your link, usually as the value of a query parameter like
?q=.
Examples
A search value
Input: coffee & tea
Output: coffee+%26+tea
The & is encoded so it isn't read as the start of a new parameter.
Accents and reserved characters
Input: café?size=large#top
Output: caf%C3%A9%3Fsize%3Dlarge%23top
é becomes its two UTF-8 bytes, and ?, = and # are encoded because they'd otherwise change the URL's structure.
Why not to encode a whole URL
Input: https://mybotsy.com/?q=red shoes
Output: https%3A%2F%2Fmybotsy.com%2F%3Fq%3Dred+shoes
Every slash and colon is encoded, so this no longer works as a link. It's only correct when the whole URL is itself a parameter value, for example in a redirect.
Common uses
- Building links with search terms or user input in the query string.
- Passing a full URL as a parameter inside another URL, for example a redirect or share link.
- Preparing values for API requests and webhooks.
- Creating mailto, WhatsApp or social share links that contain spaces and punctuation.
- Encoding non-English characters in links.
Tips and things to know
- Encode the values, not the whole URL. Encoding
https://and the slashes of the base address will break it. - This encoder writes spaces as
+, the form-style convention that query strings accept. If you need%20(for example in a path segment), replace each+with%20. - Don't encode twice. Double-encoded text shows up as
%2520instead of%20. - Need ready-made links? Try the UTM link generator, mailto link generator or WhatsApp link generator, which handle encoding for you.
Edge cases and limitations
- A literal % becomes %25:
100% naturalturns into100%25+natural. - A + in your text becomes %2B, so
a+b=cisa%2Bb%3Dc. That keeps it from being read as a space. - Running already-encoded text through again double-encodes it (%26 becomes %2526).
Frequently asked questions
What is URL encoding?
It's a way to represent characters that aren't allowed in URLs by replacing them with % and two hexadecimal digits, such as %20 for a space.
Why is a space shown as + here and %20 elsewhere?
The space has the byte value 32, which is 20 in hexadecimal, so strict percent-encoding writes it as %20. Query strings also accept the older form convention, +, which is what this tool outputs.
Which characters need to be encoded?
Anything outside letters, digits and - . _ ~ should be encoded when it appears inside a value. Reserved characters like & ? # = / + : need encoding when they're part of data rather than URL structure.
How do I decode a URL?
Use our URL decoder to turn percent-encoded text back into normal characters.
Is URL encoding the same as Base64?
No. URL encoding only replaces unsafe characters and leaves the rest readable. Base64 converts all the data into a different alphabet.
Related tools
- URL decoder: Decode URL input to back to a normal string.
- URL parser: Parse details from any URLs.
- UTM link generator: Easily add UTM valid parameters and generate a UTM trackable link.
- Base64 encoder: Encode any string input to Base64.
- Slug generator: Generate a URL slug for any string input.
Similar tools
Decode percent-encoded URLs and query strings back into readable text. Turn %20, %26 and %C3%A9 into normal characters instantly. Free URL decoder.
Popular free tools
Convert text to UPPERCASE, lowercase, Sentence case, Capital Case, camelCase, PascalCase, snake_case, CONSTANT_CASE, dot.case or param-case. Free.
Look up the DNS records of any domain: A, AAAA, CNAME, MX, NS, TXT and SOA. Check email, SPF, verification and nameserver settings for free.
Create strong, random passwords in one click. Pick the length and include uppercase, lowercase, numbers and symbols. Free, no signup.
Encode any text or string to Base64 instantly. Useful for data URIs, HTTP Basic auth headers, email and APIs. Free online Base64 encoder.
Convert numbers into words, such as 1,250 to “one thousand two hundred fifty”. Write checks, invoices, legal documents and lessons correctly. Free.
Turn normal text into elegant 𝓬𝓾𝓻𝓼𝓲𝓿𝓮 letters you can copy and paste into Instagram, TikTok, X and Discord bios, captions and names. Free.