Local browser utility · Examples and limits included

URL Encoder/Decoder

Encode text with percent-encoding so it is safe inside URLs and query strings, or decode an encoded URL component back to plain text.

Need to decode instead?Switch to the Decode tab to convert an encoded URL back to plain text.

Enter a URL or text to encode

Example: https://www.example.com/search?q=hello world

OutputEncoded URL (percent-encoded)
Your encoded URL appears here.

Processed locally in your browser No data is sent to any server

Examples

Try these examples:

What the result contains

What This Tool Provides

Percent-encode a value for use as one URL component, or decode an encoded component back to Unicode text. The operation follows encodeURIComponent/decodeURIComponent behavior, so it is intended for a query value, path segment, or similar component—not blindly for an entire URL.

  • Percent-encoded UTF-8 component text
  • Decoded Unicode text
  • Specific malformed-percent errors
  • A copyable result that preserves reserved characters as data

How to Use This Tool

  1. Enter a componentPaste a query value, path value, or already encoded component.
  2. Encode or decodeChoose the direction that matches the input.
  3. Place it correctlyCopy the result into the component position without encoding the URL separators around it.

How It Works

Percent encoding represents the UTF-8 bytes of characters using % followed by two hexadecimal digits. encodeURIComponent also escapes reserved delimiters such as &, =, ?, and / because they should be data inside a component. Decoding validates percent triplets and rejects invalid UTF-8 byte sequences.

Worked Examples

Query parameter value

Input
Kathmandu & Pokhara
Output
Kathmandu%20%26%20Pokhara

The encoded value can be placed after ?destination= without the ampersand starting another parameter.

Simple space

Input
hello world
Output
hello%20world

encodeURIComponent represents a space as %20, not the form-specific plus convention.

Percent-Encoding Versus Base64

These two get mixed up constantly. Percent-encoding makes text safe inside a URL; Base64 turns bytes into an ASCII alphabet for transport. Using the wrong one produces a link that looks fine and resolves nowhere.

Encoded URLs are painful to type, which is why turning the finished link into a QR code is often the last step — and scanning a code is how you check where one really points. JSON passed through a query string needs decoding here before it will format.

Component Encoding Versus Full URLs

A full URL contains meaningful separators such as ://, /, ?, =, and &. Component encoding escapes many of them. Build the URL structure first and encode only dynamic values, for example ?destination= plus the encoded destination.

Common Encoded Characters

Examples when characters are data inside a component
CharacterEncoded formWhy
space%20Separates ordinary text
&%26Otherwise separates query parameters
=%3DOtherwise separates a key and value
?%3FOtherwise starts a query
/%2FOtherwise separates path segments

Important Edge Cases

  • A single % or incomplete sequence such as %2 is invalid.
  • %FF is a valid-looking byte escape but not valid standalone UTF-8 text.
  • A plus sign is not converted to a space by decodeURIComponent.

Limitations

  • This is URL component encoding, not a URL validator.
  • It does not parse or rebuild a full URL.
  • Form encoding has additional + rules that are outside this tool.

Input handling

Private Browser Processing

The value is encoded or decoded in the browser. It is not appended to the page URL or submitted to Tiny Tiny Tools.

Google Analytics records page visits and whether a tool finished or failed, but these tool implementations do not send field values, generated passwords, QR payloads, uploaded QR images, or camera frames to analytics or a Tiny Tiny Tools processing endpoint.

Safety note: Decoded text can contain a suspicious URL or script-like string. It is displayed as text and never executed.

See the Privacy Policy for site-wide details.

Questions About This Tool

Should I encode an entire URL?

Usually no. Encode the dynamic component, such as a query value, while preserving the URL’s structural separators.

Why is & encoded as %26?

An unencoded ampersand separates query parameters. Encoding keeps it as part of one value.

Why did decoding %G2 fail?

G is not a hexadecimal digit. Every percent escape needs exactly two digits from 0–9 or A–F.

Does + decode to a space?

Not in this component decoder. Plus-as-space belongs to application/x-www-form-urlencoded conventions.