Skip to main content

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.

Reviewed for accuracy by the Math Ora X team Last updated

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

  1. Paste the URL, query string, or plain text into the input box.
  2. Choose encode if you need safe percent-encoding for a URL, or decode if you want to turn encoded text back into readable text.
  3. Check the output and copy it into your app, browser, or API request.
  4. If the text includes spaces, symbols, or non-ASCII characters, review the result carefully before using it.

Step by step, what happens

  1. The tool reads the text exactly as you enter it, including spaces, punctuation, and Unicode characters.
  2. If you select encode, it converts reserved and unsafe characters into percent-encoded sequences so they can travel safely in a URL.
  3. If you select decode, it turns percent-encoded sequences back into normal readable characters.
  4. 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?

  1. You paste the plain text query into the encoder.
  2. The space is converted to %20 and the question mark is converted to %3F because they are not safe as raw URL text.
  3. 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

You Might Also Like

Popular tools from other categories

Can't Find the Right Calculator?

Try our AI Math Solver, type any problem in plain English and get instant step-by-step solutions.

Try AI Solver

Browse All Categories

Home Developer Tools Current Tool
Facebook Twitter WhatsApp