← All text tools

Seven-Segment Display Code Generator

Click segments to build digits and letters and get the byte values for common cathode and common anode displays, in either bit order, with ready-made arrays.

  • Free
  • No sign-up
  • Works on any device

About Seven-Segment Display Code Generator

A seven-segment display lights segments a to g and a decimal point, and a microcontroller drives them with one byte. Click the segments to draw any digit or letter and the page shows the byte for common cathode displays, where a segment lights on a high level, and for common anode displays, where it lights on a low level and the byte is the inverse. For the digit 5 the common cathode byte is 0x6D and the anode byte is 0x92. Choose the bit order that matches your wiring and copy ready-made Arduino arrays for 0 to F.

How to use Seven-Segment Display Code Generator

  1. Pick a starting character, or clear the display and click the segments you want lit.
  2. Choose the bit order that matches how your pins are wired to the byte.
  3. Copy the hex value for your display type, or the arrays for the digits 0 to F, into your code.

Why use this tool?

Also known as

Frequently asked questions

What is the difference between common cathode and common anode?

In a common cathode display all segment cathodes join and you drive a segment high to light it. In a common anode display the anodes join and you pull a segment low, so its byte is the bitwise inverse.

Why are there two bit orders?

The byte is only a software convention. Some wiring puts segment a at bit 0, others at bit 7, depending on how you route the pins or a shift register, so the page offers both.

Do I need resistors with the display?

Yes, one current-limiting resistor per segment, typically a few hundred ohms depending on the supply and LED current. Driving a segment directly without one can damage the display or the pin.

Is Seven-Segment Display Code Generator free?

Yes. Seven-Segment Display Code Generator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.