title: What are the actual character limits for Google Chart QR codes?
body: <p>I've written some code that outputs the minimum numbers of pixels required to accommodate a standards compliant QR code given the characters to be encoded, the required margin, and EC Level.  However, I'm getting blank image responses from Google instead of valid QR Codes.</p>
  
  <p>The smallest QR Code possible is a 29x29 pixel Version 1 QR Code (21 coded modules + 4 module margin on each side).  <a href="https://chart.googleapis.com/chart?chs=29x29&amp;cht=qr&amp;chl=0&amp;chld=H%7C4&amp;choe=UTF-8" rel="nofollow noreferrer">example</a></p>
  
  <p><img src="https://i.stack.imgur.com/HnLfY.png" alt="1 char QR code"></p>
  
  <p>According to the <a href="https://developers.google.com/chart/infographics/docs/qr_codes#details" rel="nofollow noreferrer">Google Charts QR code documentation</a> the maximum number of 0-9 digits you can have in the Version 1 QR Code at EC Level H is 17.  However, specifying the parameters as such <a href="https://chart.googleapis.com/chart?chs=29x29&amp;cht=qr&amp;chl=12345678901234567&amp;chld=H%7C4&amp;choe=UTF-8" rel="nofollow noreferrer">results in a blank image</a>; no matter what the <code>choe</code> parameter is set to; because there is more data being encoded than can fit.</p>
  
  <p><img src="https://i.stack.imgur.com/pGGoP.png" alt="Should be valid but blank"></p>
  
  <p>Reducing the number of characters to 14 <a href="https://chart.googleapis.com/chart?chs=29x29&amp;cht=qr&amp;chl=12345678901234&amp;chld=H%7C4&amp;choe=UTF-8" rel="nofollow noreferrer">results in a valid QR code</a>.</p>
  
  <p><img src="https://i.stack.imgur.com/OKzcg.png" alt="Must reduce digits to work"></p>
  
  <p>So, does anyone have any idea how much data can be encoded by the Google Charts API at each given Version and EC Level?  Is it character byte dependant?  My code is written in Java, but a solution in any programming language, if required, would suffice.</p>
  
  <p>Hopefully I've done something wrong, or there is some logic that can be followed, instead of it being a "good enough" implementation of QR Codes.</p>