Free plan
Encode / decode
Change text into Base64, hex or other codes, or back again
About this tool
This tool turns text or a file into another form, or turns it back. The forms include Base64, hex, web address codes, HTML codes, Morse and more. Base64 is a way to write any data using only letters and digits. It is a coding, not secret protection. It can also show what is inside a JWT, a type of login token.
For example, you turn a short text into Base64 so it can travel safely inside a link, then turn it back later.
How to use it
- Choose this tool.
- Type or paste your text, or add a file.
- Choose the code, such as Base64 or hex, and choose Encode or Decode.
- Press Generate.
- Copy the result or download it.
What you get back
You get the changed text on screen to copy, or a file to download. This is not encryption; anyone can reverse it.
GOOD TO KNOW
A JWT is only decoded, never verified. Counts as one document.
TEST IT LIVE
Try Encode / decode in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/encode
Tool ID
documents.encode
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/encode" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'text=Hello, world' \
-F 'scheme=base64' \
-F 'action=encode'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.encode({
"text": "Hello, world",
"scheme": "base64",
"action": "encode"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->encode([
'text' => 'Hello, world',
'scheme' => 'base64',
'action' => 'encode',
]);
echo $result->requestId;More in Documents
