← Back to Home

Decode Text

/decode
Decode text from various formats including Base64, URL encoding, and hexadecimal.
Try it now

Parameters

text body
Text to decode
format body
Format: base64, url, or hex (default: base64)

Examples

curl
# Base64 decode
curl -X POST https://tcpdata.com/decode \
  -H "Content-Type: application/json" \
  -d '{"text":"SGVsbG8gV29ybGQh","format":"base64"}'

# Returns: {"decoded":"Hello World!"}

# URL decode
curl -X POST https://tcpdata.com/decode \
  -H "Content-Type: application/json" \
  -d '{"text":"hello%20world%21","format":"url"}'

# Hex decode
curl -X POST https://tcpdata.com/decode \
  -H "Content-Type: application/json" \
  -d '{"text":"414243","format":"hex"}'
JavaScript (fetch)
const response = await fetch('https://tcpdata.com/decode', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    text: 'SGVsbG8gV29ybGQh',
    format: 'base64'
  })
});
const result = await response.json();
console.log(result.decoded);
Python (requests)
import requests

response = requests.post('https://tcpdata.com/decode', json={
    'text': 'SGVsbG8gV29ybGQh',
    'format': 'base64'
})
print(response.json()['decoded'])