Dev tools

Decimal encode

Decimal encode. Runs on your device, nothing is uploaded.

Runs on your device. The file is never uploaded.

Decimal encode prints the numeric value of every byte in a file, from 0 to 255, with one space between them. Nothing is padded, so a zero byte reads 0 and not 000, and this is the shortest of the three byte notations here. The separator is fixed; there is no option for commas or newlines.

Input

Questions

What does the output mean?

One decimal number per byte, from 0 to 255, separated by single spaces. There is no padding, so a zero byte is written 0 and not 000. It is the plainest view of a file this set offers: the numeric value of every byte in order.

Is this the same as Charcode encode?

No, and the difference shows up as soon as your text leaves ASCII. Decimal encodes bytes, so the character e-acute becomes 195 169, its two UTF-8 bytes. Charcode encodes Unicode code points, so the same character becomes a single number, 233. For plain ASCII the two tools agree.

How is it different from the binary and octal encoders?

Only the base. All three walk the same bytes and separate them with spaces; binary writes eight base-2 digits, octal writes three base-8 digits, and this one writes the value in base 10 with no padding at all. Decimal gives the shortest output of the three.

Can I choose a comma or a newline as the separator?

No, the tool has no options and always uses a single space. Paste the result into an editor and replace the spaces with whatever your target format needs, such as commas for a C array initialiser or newlines for a column. The numbers themselves are plain decimal with no padding, so they drop into most syntaxes unchanged.

Is this a form of protection?

No. It is the byte values written in the base most people read, and the mapping is public and fixed. Anyone can convert the numbers straight back to the original file. Decimal encoding is for inspecting or transporting bytes in a form a human can check, not for keeping anything secret.

Does the tool need a connection?

No. It runs in a Web Worker in the tab, so it works with the network off and never uploads the file you dropped. After the first visit the whole site is cached, which is why the page loads and the tool runs with no connection at all. Nothing is kept once the tab is closed.

Related Dev tools