Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

Does Browser JPEG Quality Have Only 101 Steps? What 0.955 and 0.964 Show in Chromium

The HTML Standard does not cap canvas JPEG quality at 101 steps. A reported Chromium 149 test found that 0.955 through 0.964 produced the same 362,299-byte file, but the whole-percent explanation is unconfirmed.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

No, the HTML Standard does not limit canvas JPEG quality to 101 steps. But one reported Chromium 149 test found that quality values from 0.955 through 0.964 all produced a 362,299-byte JPEG, so those values looked like the same file. The 101-step explanation is the test author’s inference, not a documented browser rule.

What the standard actually promises

The WHATWG HTML Standard defines canvas.toDataURL([type [, quality]]). The first argument selects the image format and defaults to PNG. If the requested type is unsupported, the browser falls back to PNG, so a developer should check which format was actually returned. For formats that support variable quality, such as JPEG, the second argument is a number in the range 0.0 to 1.0 inclusive. The standard describes toBlob() as accepting the same optional quality parameter for those formats.

As an Amazon Associate I earn from qualifying purchases.

“The second argument applies if the type is an image format that supports variable quality (such as “image/jpeg”), and is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image.”
— WHATWG, HTML Standard, Canvas section (Edition for Web Developers)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The standard fixes the accepted input range and the intended meaning of the value. It does not prescribe how an encoder maps that number to its internal quantization settings, and it does not say that distinct inputs must produce distinct bytes. That gap is why a 101-step claim cannot be settled from the specification alone.

The Mozilla Developer Network documentation for HTMLCanvasElement.toDataURL() (last modified 2025-09-11) describes quality as a Number from 0 to 1 for lossy formats such as JPEG and WebP. If the value is omitted or falls outside the allowed range, the browser uses its default quality. MDN also notes that toDataURL() builds the entire image as an in-memory string, and it recommends toBlob() with URL.createObjectURL() for larger images because of performance and URL-length concerns.

What the reported test measured

The observation comes from a September 30, 2026 DEV Community post by yue xing. The setup was narrow:

  • An Apple M4 computer with 16 GB of RAM
  • An open-source Chromium 149 build
  • One 1440×2400 screenshot of a help page containing text and flat UI

The author reported the following JPEG sizes for the values they tried:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Quality value tried Reported JPEG size What it shows
0.950 and 0.951 336,289 bytes Identical size for both values
0.955 through 0.964 (each value tried, including 0.955 and 0.964) 362,299 bytes Identical size across the whole tested run
0.965, 0.969 and 0.970 393,304 bytes Identical size for these three values

The equal byte counts are the observed result. The author describes the 0.955 and 0.964 outputs as the same file. These figures come from one author’s run on one machine with one image, and no independent byte-for-byte reproduction is published.

Why “101 steps” is a hypothesis, not a fact

The number 101 has a simple origin. If a 0–1 quality value is rounded to a whole percent, the possible results are 0 through 100, which is 101 distinct values. The author’s reported plateau is consistent with that rounding. However, the author states that they did not find or confirm the relevant Chromium code path, so the whole-percent explanation remains an interpretation of the observed sizes.

Other explanations are also possible. An encoder may map the input onto its own integer quality or quantization settings in a way that produces flat regions between certain values. The reported test cannot separate these explanations, so the accurate claim is narrower: in this Chromium build, on this image, several adjacent inputs produced the same output size.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Using the plateau when you target a file size

Developers who search quality values to meet a byte budget can use repeated sizes as a signal. If two adjacent tested values return the same byte count, refining the search between them is unlikely to change that output in the same environment. A practical workflow:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Encode the canvas with toBlob() at a coarse set of quality values, such as 0.5, 0.7, and 0.9, and record blob.size for each.
  2. Narrow the search only where the byte size changes, and stop refining across any interval where the size is unchanged.
  3. Check blob.type before measuring. If the browser returned image/png instead of image/jpeg, the size comparison is meaningless.
  4. Repeat the measurement in each target browser and on representative images. Do not assume the same plateau appears elsewhere.
function encodeJpeg(canvas, quality) {
  return new Promise((resolve) => {
    canvas.toBlob((blob) => resolve(blob), "image/jpeg", quality);
  });
}

const blob = await encodeJpeg(canvas, 0.955);
console.log(blob.type, blob.size);

The same author compared two search methods on the screenshot. A float search used 8 encodes and took 72 ms. An integer search used 6 encodes and took 49 ms. Both found the same file, at 99.1% of the stated byte budget. These timings come from that one machine and should not be treated as general performance expectations.

Where the evidence stops

  • The test covers one Chromium 149 build. Firefox, Safari, and other Chromium releases were not tested in the report.
  • The test uses one screenshot with text and flat UI. Photographs and other content may behave differently.
  • The 101-step rounding explanation is the author’s inference and has not been confirmed from Chromium source code.
  • The standard sets the input range but does not define the mapping from input to output, so browser-specific behavior should be verified rather than assumed.

For code that must produce a specific byte count, measure the output in each browser you support instead of relying on a shared quality table.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.