Skip to main content

RGB to Hex

Convert rgb() colors to hex codes.

What does this tool do?

Direct answerRGB to Hex converts each 0–255 channel to two hex digits and joins them.
Key factChannels are clamped to 0-255 before conversion.
ProcessingRuns locally in your browser; no data is sent to a server.

How to use

  1. Type rgb values like rgb(255, 99, 71).
  2. Click Convert.
  3. See the hex code.

Example

Input

rgb(255, 99, 71)

Output

#ff6347

Who is this for?

This tool was built for people who need a fast answer in the browser — no install, no account, no data leaving the device.

Programmers working with low-level data, computer science students, and electronics hobbyists reading registers — anyone tired of converting number bases by hand.

Frequently asked questions

Can I pass values over 255?

They clamp to 255 (and negatives to 0).

Is output lowercase?

Lowercase by default — #ff6347.

Alpha channel?

Use the RGBa to Hex tool for colors with opacity.

More tools in this category