URL Encoder & Decoder
Percent-encode text for safe use in URLs, or decode an encoded URL back to readable text. Handles spaces, special characters and Unicode.
About this tool
Percent-encode text for safe use in URLs, or decode an encoded URL back to readable text. Handles spaces, special characters and Unicode.
Example
Input: hello world & more
Output: hello%20world%20%26%20more
Privacy
This tool runs entirely in your browser. Your data is processed locally and never uploaded to a server.
How to use this tool
- Paste the URL, query string, or plain text into the input box.
- Choose encode if you need safe percent-encoding for a URL, or decode if you want to turn encoded text back into readable text.
- Check the output and copy it into your app, browser, or API request.
- If the text includes spaces, symbols, or non-ASCII characters, review the result carefully before using it.
Step by step, what happens
- The tool reads the text exactly as you enter it, including spaces, punctuation, and Unicode characters.
- If you select encode, it converts reserved and unsafe characters into percent-encoded sequences so they can travel safely in a URL.
- If you select decode, it turns percent-encoded sequences back into normal readable characters.
- The result is shown instantly so you can verify the final URL or query parameter value before copying it.
Worked example
A common use case is encoding a search query before placing it into a URL.
Input: cafe au lait?
- You paste the plain text query into the encoder.
- The space is converted to %20 and the question mark is converted to %3F because they are not safe as raw URL text.
- You copy the encoded result into a query parameter or path segment.
Output: cafe%20au%20lait%3F
Tips and common mistakes
- Use encode when you are building a URL or query parameter, especially if the text contains spaces, slashes, ampersands, or question marks.
- Use decode when you are inspecting an already encoded URL so you can read the original text more easily.
- Do not encode an already encoded string twice unless that is exactly what you need, because it will become harder to read and may break links.
- Remember that full URLs and individual query values are often handled differently, so be sure you are encoding the right piece of text.
Frequently asked questions
What is URL encoding?
URL encoding (percent-encoding) replaces unsafe characters with a % followed by hex digits, so they can be safely placed in a URL.
encodeURI vs encodeURIComponent?
encodeURI keeps characters like / and ? that are valid in a full URL; encodeURIComponent encodes them too, for use inside a single query value.
Does it handle Unicode?
Yes, non-ASCII characters are encoded as UTF-8 percent sequences.
More Developer Tools Tools
Explore related calculators in this category
Hex Encoder / Decoder
Convert text to hexadecimal or decode hex back to text instantly. UTF-8 aware online hex tool.
URL Parser
Break a URL into its components: scheme, host, port, path, query and fragment.
URL Validator
Validate whether a string is a well-formed URL. Checks scheme, host and structure.
.htaccess Generator
Generate common .htaccess rules, force HTTPS, www redirect, and caching, with checkboxes.
You Might Also Like
Popular tools from other categories
URL Slug Cleaner
Clean up messy URL slugs, remove stop words, extra hyphens, special characters and uppercase for tidy, SEO-friendly URLs.
1031 Exchange Calculator - Free Online
Free Calculate tax deferral in a 1031 exchange. Step-by-step solutions and formulas included. Fast, accurate, and free, with formula and example.
4% Rule Calculator
Find the retirement nest egg you need using the 4% safe-withdrawal rule.
70% Rule Calculator
Calculate max offer using the 70% rule for flips.
Can't Find the Right Calculator?
Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.