A REST API designed to be fast, reliable and accurate. It implements 45+ classical ciphers and can be called from any website or programming language over HTTPS. Java developers can also skip the API and use the ciphers directly through the ciphertools-core Java library, available from Maven Central. Source code of the algorithms in use can be found at: https://gitlab.com/ciphertools
Disclaimer: The tools provided here are intended for learning, puzzles and entertainment. The ciphers are not secure, and should never be used to protect real data. Do not send any sensitive or private text (such as passwords, personal details or confidential messages) to this site. Requests may be logged, as text sent in query strings are visible in URLs, browser history and server logs.
https://cipher.tools/api/v1/encodeRequest type: GET
This endpoint encodes text using any cipher implemented in ciphertools-core. The parameters are as follows:
cipher The ID of the cipher to encode with. Use the https://cipher.tools/api/v1/ciphers endpoint to get a full list of supported ciphers and their IDs.key The key used for encoding. The expected format depends on the cipher given.plaintext The text to encode, limited to 500 characters.format (optional) How the ciphertext should be formatted. Multiple formats can be supplied, either as repeated query parameters or as a single comma-separated value.https://cipher.tools/api/v1/encode?cipher=caesar&key=2&plaintext=thequickbrownfoxjumpsoverthelazydog
https://cipher.tools/api/v1/encode?cipher=affine&key=5%2013&plaintext=onceinabluemoon&format=block:5,case:upper
The order of the formats matters: they are applied in the order they appear in the query string, so the same formats in a different order can produce different output. For example:
format=block:5&format=case:start produces Ndjeu Hkdpe Hdndg Eurtt
format=case:start&format=block:5 produces Ndjeu hkdpe hdndg eurtt
https://cipher.tools/api/v1/decodeRequest type: GET
This endpoint decodes text using any cipher implemented in ciphertools-core. The parameters are as follows:
cipher The ID of the cipher to decode with. Use the https://cipher.tools/api/v1/ciphers endpoint to get a full list of supported ciphers and their IDs.key The key used for decoding. This is the same key that was used to encode the text.ciphertext The text to decode, limited to 500 characters.https://cipher.tools/api/v1/decode?cipher=caesar&key=2&ciphertext=VJGSWKEMDTQYPHQZLWORUQXGTVJGNCBAFQI
https://cipher.tools/api/v1/ciphersRequest type: GET
This endpoint takes no arguments. It returns a list of all supported ciphers, including the IDs to use in the cipher parameter of the other endpoints.
You can call the API from a web page using plain JavaScript (or a library of your choice), which lets you build a site around it.
const urlParams = new URLSearchParams({
cipher: "caesar",
key: 2,
plaintext: "THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG"
});
fetch("https://cipher.tools/api/v1/encode?" + urlParams).then(function(res) {
return res.json();
}).then(function(data) {
console.log(data.ciphertext);
// > VJGSWKEMDTQYPHQZLWORUQXGTVJGNCBAFQI
});
On Linux-based systems, you can call the API from the command line with curl*.
* curl can also be installed on Windows machines
$ curl -X GET -H "Content-Type:application/json" -G \
'https://cipher.tools/api/v1/encode' \
-d cipher=caesar \
-d key=2 \
-d plaintext=THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG
$ {"normaltext":"THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG","ciphertext":"VJGSWKEMDTQYPHQZLWORUQXGTVJGNCBAFQI"}
All programming languages have an HTTPS client that can make GET requests. Some examples (not an exhaustive list) are:
java.net.http.HttpClientHTTP::Requestcurl_init()http.Get