URL Encoder Decoder Online: Free and Instant

URL Encoder & Decoder

Enter the text that you wish to encode or decode

0 chars
0 chars

A URL encoder decoder converts text into a safe percent-encoded form for web addresses, and turns encoded strings back into readable text. This free tool is for developers, marketers and SEOs who work with query strings, API calls and tracking links. Paste your text, pick an encoding type, and the result appears as you type.

What Is URL Encoding?

URL encoding, also called percent encoding, replaces characters that are not safe in a web address with a percent sign followed by two hexadecimal digits. A space becomes %20 and an ampersand becomes %26. Characters outside basic ASCII, such as accented letters or emoji, are first converted to UTF-8 bytes and each byte is then percent-encoded.

Web addresses can only carry a limited set of characters. Some characters also have a special job: ? starts the query string, & separates parameters, = separates a name from its value and # starts a fragment. If your data contains one of these as plain content, encoding keeps it from being misread.

CharacterEncodedWhy it matters
Space%20Spaces break links
&%26Splits parameters
=%3DSplits name and value
#%23Starts a fragment
%%25Starts every escape

What Are the Four Encoding Types?

The tool offers four encoding types, and picking the right one is the most important decision you make. Each answers a different question.

URL Encode

Use this when you have a whole address. It encodes spaces, quotes and non-ASCII characters but leaves structural characters such as :, /, ?, &, = and # untouched, so the link keeps working.

URL Component

Use this when you have one piece of data that will sit inside a URL, such as a search term or a redirect target. It also encodes the structural characters, so & becomes %26 and / becomes %2F.

Base64

Base64 rewrites text using 64 plain characters (letters, digits, plus, slash and equals). It is not percent encoding and it is not encryption. It handles UTF-8 text, so accented characters survive a round trip.

HTML Entities

This mode swaps five characters for entities: the ampersand, less-than, greater-than, double quote and single quote. Use it when text must appear safely inside an HTML page, not inside a URL.

How to Use the URL Encoder and Decoder

You can encode or decode a string in four quick steps, and the output updates live without a submit button.

  1. Choose Encode to convert plain text, or Decode to convert an encoded string back.
  2. Select an Encoding Type: URL Encode, URL Component, Base64 or HTML Entities.
  3. Type in the Input box, or press Paste to drop in text from your clipboard. The box shows a character count.
  4. Read the Output box, then press Copy to take the result. Press Clear to start over.

The Swap button moves the output into the input, which is handy for checking a round trip: encode a string, press Swap, switch to Decode, and confirm you get your original text back.

Worked Examples: What the Tool Returns

These three examples show how the same kind of input changes with the encoding type, and what the length summary tells you.

Example 1: A full address with a space

Input: https://example.com/search?q=red shoes&size=10 (46 characters). With Encode and URL Encode, the output is https://example.com/search?q=red%20shoes&size=10 (48 characters). Only the space changed. The tool reports that the output is 2 characters longer (4% increase). The link structure is intact and the address is now valid.

Example 2: A single parameter value

Input: red shoes & socks (17 characters). With URL Component, the output is red%20shoes%20%26%20socks (25 characters), which is 8 characters longer (47% increase). The ampersand became %26, so the value can sit inside a query string without splitting it into two parameters. With URL Encode instead, the ampersand would stay as it is, and the parameter would break.

Example 3: Base64

Input: hello (5 characters). With Base64, the output is aGVsbG8= (8 characters), 3 characters longer (60% increase). Base64 output is usually about one third larger than the input, plus padding.

How to Read and Act on the Results

The Output box shows the converted text, and a summary line under it tells you how many characters longer or shorter the result is. A longer result after encoding is normal. A shorter result after decoding is also normal, because each three-character escape collapses into one character.

  • No summary line: the input and output have the same length. Your text probably had nothing to encode in that mode.
  • A result starting with Error: the input is not valid for the chosen mode. The usual cause is a stray percent sign not followed by two hex digits, or Base64 text with missing characters. Fix the string, or switch to the correct type.
  • Very large increase: text with many non-ASCII characters grows quickly, because each character becomes up to four percent-encoded bytes. Keep an eye on URL length if the address must stay short.

How Do You Decode a URL-Encoded String?

To decode a URL-encoded string, switch to Decode, choose URL Component (or URL Encode), and paste the string. Each %XX group turns back into its character. For example, caf%C3%A9%20menu decodes to café menu.

Developers often search for how to decode in Java, Python, C# or JavaScript. Every language follows the same percent-encoding rules, so you can use this page to check what your own code should produce. If your code and this output disagree, the usual cause is that one side treated a plus sign as a space.

URL Encode decoding leaves sequences like %26 and %2F as they are, because those characters are reserved. If you need them turned back into & and /, use URL Component.

Who Uses a URL Encoder and Decoder?

Anyone who moves text between a human-readable form and a web address will find it useful.

  • SEOs and marketers: build tracking links with campaign names that contain spaces or symbols, and read encoded URLs in analytics reports.
  • Developers: prepare query parameters for API requests, decode form data, and check redirect targets that are passed inside another URL.
  • Content editors: fix a link that breaks because a title or file name contains a space or an accented letter.
  • QA testers: confirm that a string survives a round trip before it goes into a test case.

If you are reading a link hidden inside a code image, first pull the text out with the QR code decoder, then paste it here to decode any percent-encoded parts. After cleaning a long link, the URL shortener can make it easier to share, and the bulk URL shortener handles many at once.

Best Practices, Common Mistakes and Troubleshooting

Most encoding bugs come from using the wrong mode or encoding twice. These habits prevent both.

Encode values, not whole built URLs

Encode each parameter value with URL Component, then join the pieces with the real ?, & and =. If you run a finished query string through URL Component, the separators are encoded too and the link stops working.

Avoid double encoding

If you see %2520 in a link, the string was encoded twice: the percent sign in %20 became %25. Decode once, check that you get %20, and decode again to reach the plain text.

Watch the plus sign

In HTML form submissions, a plus sign often stands for a space. This tool treats a plus as a plus when decoding. If your data came from a form and shows plus signs where you expect spaces, replace them with spaces before decoding.

Do not treat Base64 as security

Anyone can decode Base64. Never use it to hide passwords or secrets. The same applies to a password placed inside a URL: encode special characters in it, but remember the link still exposes the password.

Match the mode to the destination

Use URL Encode or URL Component for addresses, and HTML Entities only for text shown on a page. Mixing them gives output that looks right but fails in the place it is used.

Limitations and Accuracy Notes

The tool converts exactly what you paste and does not check whether the final address exists or loads. It does not rewrite paths or shorten links, so for readable permalinks try the URL rewriting tool. Decoding fails on malformed input rather than guessing, which is deliberate: a visible error is safer than silent corruption. Lone surrogate characters in the input can also cause an error when encoding.

Base64 here is meant for text. It is not an image or file converter. For converting text to binary instead, see the binary translator, and browse more utilities in the online calculators and utilities category.

Paste your string into the encoder at the top of this page, choose the right encoding type, and copy a clean result in seconds. Use Swap to confirm the round trip before you ship the link or API call.

Frequently Asked Questions

What is URL encoding and why is it needed?
URL encoding replaces unsafe characters in a web address with a percent sign and two hex digits, such as %20 for a space. It is needed because URLs allow only a limited character set, and characters like ampersand or hash have special meanings.
How do I decode a URL-encoded string?
Choose Decode, pick URL Component, and paste the string into the Input box. The Output box shows readable text instantly. For example, caf%C3%A9%20menu becomes café menu. Use Copy to take the result.
What is the difference between URL Encode and URL Component?
URL Encode keeps structural characters such as slash, question mark, ampersand and equals, so a full link still works. URL Component encodes them too, which makes it the right choice for a single parameter value inside a query string.
Why does the decoder show an error?
The decoder shows an error when the input is not valid for the chosen type. A stray percent sign not followed by two hex digits, or broken Base64 text, are the usual causes. Fix the string or switch the encoding type.
What does %2520 mean in a URL?
The code %2520 means the text was encoded twice. The percent sign in %20 was itself encoded as %25. Decode once to get %20, then decode again to reach the original space or character.
Is the URL encoder and decoder free, and can it process many URLs at once?
The tool is free and needs no sign-in. It converts one block of text at a time as you type, so for several URLs, paste them into the Input box together or run them one after another.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now