How to Encode and Decode URLs

Updated: April 4, 2026

URL encoding is one of those things developers deal with constantly — building API requests, debugging redirect URLs, passing data in query strings, or fixing broken links with special characters. This guide shows you how to encode and decode URLs instantly.

When You Need URL Encoding

How to Encode a URL

Step 1: Open the tool

Go to the URL Encoder & Decoder and make sure the "Encode" tab is selected.

Step 2: Choose the encoding mode

Select Component to encode a value for use inside a query parameter (encodes everything including /, ?, &). Select Full URL to encode a complete URL while preserving its structure.

Step 3: Enter text and encode

Paste your text or URL, then click "Encode →". The encoded result appears below. Click "Copy" to use it.

How to Decode a URL

Step 1: Switch to Decode mode

Click the "Decode" tab.

Step 2: Paste the encoded string

Paste the percent-encoded string (e.g. hello%20world%26lang%3Dja).

Step 3: Click Decode

The decoded, human-readable text appears below. Use the "↕ Swap" button to quickly re-encode the result.

Tips

FAQ

What is URL encoding?

URL encoding (also called percent-encoding) replaces unsafe characters in URLs with a % followed by two hex digits. For example, a space becomes %20 and & becomes %26. This ensures URLs are valid and unambiguous.

What is the difference between Component and Full URL encoding?

Component encoding (encodeURIComponent) encodes everything except letters, digits, and a few safe characters. It's used for query parameter values. Full URL encoding (encodeURI) preserves URL structure characters like ://?#&= so the URL remains navigable.

When should I use Component vs Full URL?

Use Component when encoding a value that will be placed inside a URL parameter (e.g., a search query). Use Full URL when you have a complete URL with special characters in the path and want to keep the URL structure intact.

Is my data uploaded to a server?

No. All encoding and decoding happens entirely in your browser using JavaScript. Your data never leaves your device.

Try It Now

Ready to encode or decode? Open the URL Encoder & Decoder — it works entirely in your browser with no sign-up required.