# 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"}'
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);
import requests
response = requests.post('https://tcpdata.com/decode', json={
'text': 'SGVsbG8gV29ybGQh',
'format': 'base64'
})
print(response.json()['decoded'])