Testing Google - Boundary Value Exploration!

Ever wondered about the boundary of Google’s Search box? Ever tried to test it? Well, recently during an online discussion, I was testing it with a friend [Gopali Virmani – She is the one who found and informed me about some more naughty keywords (key-letters actually! – and the letters are: b, e, f, i, j, l, s, y) capable of reproducing java script error that I have mentioned in Yet another Bug in Google Suggest!]. Although I have tested Google’s search box several times before, this time I got some extra information while testing it. So I wanted to share it here.

Note: I didn't have any specification mentioning the proposed boundary for the Google’s Search box that I was testing. So there was no scope to follow the so called Boundary Value Analysis (BVA - fame ISTQB) where we are given a range and are expected to test the boundary with values exactly matching the upper and lower boundary, values just above the boundary and values just below the boundary! For a simpler example if a boundary range for a text box were given as 5-100, BVA would expect one to test the boundary with test data of length 4, 5, 6, 99, 100 and 101. Look closely and you would know that here we are just adding and subtracting the upper and lower boundary values with ONE (1) and taking the resulting value as test data. To me it appears a simple arithmetic operation rather than any “Analysis”! My 7-year-old cousin can add and subtract a number by 1. Then can he do BVA too? Think over it. I would rather like to leave it to the readers to think and decide whether to still call it “Boundary Value Analysis”!

Oops! Looks like this is turning out to be yet another controversial post! But believe me; I never wanted to make it one. So better I should come back to the main theme, i.e. testing the boundary of Google Search box and stay away from controversy. :) Before I come to the procedure I followed while testing, let me share my testing mission first.

Testing Mission: To test and identify the different possible boundaries of Google’s Search box and any more information related to it.

Procedures I followed while Testing:
1. I opened
Google home page. Didn’t enter anything in the Search box and hit “Google Search” button. What did I expect here? Well, I am not sure! But it looked like my search query was being processed (blank search keyword was sent to the Google data center and no results were returned!). But as an end user I didn’t notice any difference in the page other than a flickering of the page and a progress bar in the status bar indicating a page reload! Wouldn’t have it been better if Google had displayed some No Search Term Error page like dogpile? But however I came to know that the minimum allowed keyword length (lower boundary!) for Google’s Search box is Zero (0). [I am wondering if there is any way to test the boundary with –1 keyword length. I am worried for people following BVA. So am curious! :)]

2. Now I had to test the maximum possible keyword length. So I copied a paragraph from
Wikipedia’s definition for Software Testing (you may use your own test data). Here is the paragraph that I used as my test data:

Software testing is the process used to help identify the correctness, completeness, security, and quality of developed computer software or application. Testing is a process of technical investigation, performed on behalf of stakeholders, that is intended to reveal quality-related information about the product with respect to the context in which it is intended to operate. This includes, but is not limited to, the process of executing a program or application with the intent of finding errors. Quality is not an absolute; it is value to some person. With that in mind, testing can never completely establish the correctness of arbitrary computer software; testing furnishes a 'criticism' or comparison that compares the state and behaviour of the product against a specification.

I pasted it in the Google Search box and hit “Google Search” button. I got at least 3 important information in the
search result page! Look just below the Search box and you will notice some extra lines of text containing some interesting information.

a) Try uppercase "OR" to search for either of two terms. [
b) The "AND" operator is unnecessary -- we include all search terms by default. [
c) "but" (and any subsequent words) was ignored because we limit queries to 32 words.

Interesting! Aint they? The first two messages tell us about the way Google interprets “OR” and “AND” when they are used inside a keyword string. And the last message is really interesting. It tells that Google limits the queries to 32 words. Looks like a boundary. Isn’t it? I tried with keywords with different word counts. But got the above message, only when it was with more than 32 words. So this almost confirmed my inference that the maximum allowed words in a Google Search string is 32 words. If it is more, Google just ignores the rest!

3. This time I was to test the maximum allowed characters in the Google Search box. So took the above paragraph (Wikipedia’s definition for Software Testing) and tried pasting it in the Search box several times (in fact copied the paragraph and held down Ctrl+V key combination after clicking inside the Google Search box!). Sound’s crazy! But let me tell you, to explore something as a tester sometimes we have to be little crazy. :) Well, wait! The cursor inside the Search box looked like the pasting had been stopped! Hurray! I tried to enter some words manually inside the Search box. No! I couldn’t feed any more character into the Search Box. Another boundary? Let’s see. I copied the whole search string from the Search box and pasted it into a new MS Word document. Used Word Count feature (Alt+T+W) of MS Word and found the total Characters (with spaces) to be 2,048! The number itself was amazing – 2,048 – 2 to the power 11 – double of 1,024 – 2k. Got any clue!

Then I hit the “Google Search” button (with 2,048 characters already in the Search box). Bang!!! I got “
Internet Explorer cannot display the webpage” message! Well, this is not what I intended to get. Anyway, I tried different things and pressing F5 (Page Refresh) was one among them. Refreshing the page displayed Google 400 Bad Request page with message – “Bad Request; Your client has issued a malformed or illegal request”! Well, this message is not what surprised me. But, this should have been displayed straight-away when I tried with the 2,048 long Search string. Why was I displayed with the Internet Explorer cannot display the webpage” message? I tried it several times and every time I had to see the Internet Explorer cannot display the webpage” message instead of the Google 400 Bad Request page! Could this be a problem (bug!) with Google? I am still wondering.

4. I was curious to see the boundary where I could directly get the “Google 400 Bad Request” page without having to see the unwanted “Internet Explorer cannot display the webpage” page. So I kept reducing the maximum allowed characters (2,048) on a regular interval (reducing 20 characters at one go) and a little more investigation revealed another boundary! It is 1,980 Characters (with spaces). If your search string is less than or equal to 1,980 Characters, then you won’t have to see the “Internet Explorer cannot display the webpage” page and directly you will get the “Google 400 Bad Request” page.

My Inference: After the above testing, I came to the following conclusion regarding the possible boundaries for Google’s Search box:

a) The minimum allowed characters in a search keyword is 0 characters.
b) The maximum allowed words in a search string is 32 words. The rest of the words are ignored by Google while processing the query.
c) The maximum allowed characters in a search keyword is 2,048 characters. But this displays an “Internet Explorer cannot display the webpage” page. Refreshing this page however shows a more graceful “Google 400 Bad Request” page.
d) If your Search string is less than or equal to 1,980 characters, you will be displayed directly with a “Google 400 Bad Request” page.
e) I am not sure about a case when my Search string contains 1,980 characters and there are some available search results!

In my above experiment with boundary testing, I have tried to explore the boundary instead of taking a fixed boundary and testing it with a set of six test data!

Here is an
interesting post by Shrini Kulkarni, where he has coined the term “Boundary Value Exploration” (BVE) and explained it in detail. I am not sure if what I have done in the above testing experiment can be considered as BVE though. :)

Update: If your Search string is more than 2,048 characters and you try to paste it as your keyword phrase, Google truncates the characters after the 2,048th character and directly displays the “Google 400 Bad Request” page.

Happy Testing…
Share on Google Plus

About Debasis Pradhan

Debasis has over a decade worth of exclusive experience in the field of Software Quality Assurance, Software Development and Testing. He writes here to share some of his interesting experiences with fellow testers.


  1. Regarding the 2048 limit on the search string - that's simply the attribute added to the input box for search - i.e. they've set input maxlength=2048 within the html for the input box.

    You could test 2047, 2048, and 2049, but you'd have to realize that you would be testing the browsers implementation of the textbox control, and not really google...although I guess I would still test 2048 and 2049 to ensure that those values worked, and were truncated correctly...I think.

    BVA may not be the best design technique for google search :}

  2. Accidentally hit submit on my last comment before I was done.

    Anyway...good investigation, and some interesting results. It may be interesting to try these tests in different browsers and perhaps even on a different search engine like search.live.com. The interesting with live.com is that they don't limit the input field, so there's no "known" limit (that I know of) on the number of characters that can be searched for, nor can I find a limit on the number of words in a query. However, using techniques similar to yours, I'm finding that 2020 appears to be the character limit. It may have to do with the http command line (2084 for a string of 2020 characters), but I'd have to look into that to figure out for sure.

    Interesting stuff.

  3. @ Alan,

    Thanks for stopping by and sharing your valuable ideas. Congrats for becoming the first Microsoft Tester to comment on my blog. :) Jokes aprt, I understand that the 2048 limit on the search string might be possibly due to a maxlength=2048 in the input box. But we might not have find this out without exploring the boundary [unless we could have get this information from someone from Google :)!]

    After reading your comment, I am curious and excited to test search.live.com and explore its boundaries. I think I am gonna follow BVE once again while testing it. :)

    Thanks for you insight.


  4. Hi Debasis,

    I was really impressed by this post of yours and started doing a little bit of the same myself.
    I found out that It was not 1980 characters limit which was causing Bad Page request error, however it was the positioning and placement of few characters like @, # and ( which i could figure out while doing the same was causing the Bad Page request. I do not know if i am right in the same, however i feel that we need to explore more on the same to find exact reason.
    Here is what i found out. You might want to have a look at the same and provide me your comments.


  5. @ Madhukar,

    I have gone through your post. I saw you using some special characters to get the "Google 400 Bad Request page". Good effort. But the Bad request page is NOT an error. Rather it is an warning message to let the user know about the possible malformed or illegal request! So the boundary for getting a Bad Request page can be anything. And I suppose it does not have any fixed boundary. Whenever a request is malformed or illegal this message will be displayed.

    Coming back to my inference, I think the boundary 1,980 is for getting or not getting a "Internet Explorer cannot display the webpage" message. Furthermore, you might notice that I have not used any of the special characters that you have used in your case. Still I got the "Google 400 Bad Request page" as the request was supposedly malformed or illegal!

    Anyways, great effort from your end. Keep it up.


  6. Thanks for useful Article.

    Warm Rgs

  7. Hi Debasis,

    I explored google search today. I was interested in your findings. In the process, I observed a max limit for 2048 for the search text box. I also observed that the maximum length of the search string for which I did not get a Bad Request page was 2012.

    I then tried the advanced search options, by choosing file types etc. Interestingly, as I expected, the length of permissible string further came down.

    There was an interesting observation. The URL of the complete search for all the searches which did not give a Bad Request page remained 2068 characters in length.

    I noted down my observation: Whatever search string you give, the maximum permissible search string which will not give bad request page is a string which in combination with the search options used does not give a URL of length more than 2068 chars long.

    E.g I used a long string..the permissible string length was 2012 chars. Now I gave the condition filetype:pdf along with the same search string. I got a bad request page. The reason is that this search option is appended to the URL.

    Following are the URLs in both cases:


    query String1:hl=en&q=aaaaaaaaaaaa....

    query string2: hl=en&q=filetype%3Apdf+aaaaa

    We see that the seach option for PDF files modifies the URL to include filetype%3Apdf+ in the URL.

    Now, to validate whether there is constraint on the URL length the browser handles or the query string length Google can handle, I used www.google.com instead of www.google.co.in. As there is difference in length of both the server names, I expected some good obervation. Here it goes:

    With www.google.com the URL length decreased to 2066 characters from 2068 characters. Note that there is a difference of two chars in the length of server names. Now I measured the length of the query string. The length of the query string in both the cases was: 2037.

    So, my conclusion is that whatever search criteria results in a query string of more than 2037 characters for google, results in a Bad request page.

    Rahul Verma

  8. @ Rahul,

    Great observations, I must say. Thanks for spending time to explore boundary of Google and leaving your findings here. Soon, I will look into your findings. Great job!


  9. Hi Debasis,
    It is really good to read your articles, which are making my testing shoes stronger.

    I tried few experiments with "youtube.com"
    min length = 0
    max length= 120

    One interesting thing i found out is when i am entering space , i mean to say blank space it is taking it as null .
    What kind of conclusion can be drawn from this , please assist.


  10. Hi debasis,

    I tried the same experiment with google.
    Its displaying no results.


  11. @ Jitendra,

    I would have loved to validate your results with Youtube, but unfortunately Youtube is DOWN (again!) at this very moment! Anyway, I will check back again soon to test it's boundaries and to see how it treats BLANK_SPACES! I am glad that you tried to explore Youtube after reading this blog entry. That shows that you have got the curiosity, a tester must have. Happy Testing...


  12. It seems that I read this post earlier but did not seem pay attention to ... Few comments though ...

    1. How many boundaries did you discover in your testing?
    - 0 the lower limit
    - 2048 - the maximum number of characters in the search limit
    - 32 - number of words in a question

    so, interesting thing here is to note a "string" type input variable - scalar variable can have many boundaries depending upon the processing logic of the application and platform (browser, OS, even the hardware). This clearly exposes the "hollowness" traditional approaches to BVA as mentioned in many books and certification exams like ISTQB.

    2. Neither you or people who commented (like Alan) did not mention about HTTP GET limit of 2048 in the browser - where the data to be passed to server is appended to the URL. Google uses http GET method to pass the search query to server. so the limit of 2048 seems to have been imposed by the HTTP - GET.

    Refer to following link

    Since the search string is part of URL, IE imposes the limit of 2048 characters for the GET portion. So this is not a "Google" search boundary. It is boundary of browser. Howzzzzzzzzzzt?

    If you are interested in URL size limit (hence Google search string limit) in other browsers


    So you might want to investigate bit on google search on firefox. You will be able to do more ... as URL size is bigger there.

    3. Thanks for quoting my blog on BVE in the post, it would have been better if you have referred it earlier in the post as your post is titiled as such.

    What you have done is part of BVE ... what I call as BVE "outsider's view". If you know the internal details of how the string is processed (such as boundary of 32 words) you will get few more boundaries of google search string.

    Also you check out Non ASCII strings.

    Good post ... how about you doing ECP technique for google search...

    Check out my blogs on ECP Technique


  13. I observed that a string containing only character "a" having length 1980 character gives "host" not available error (this is custom error) - actul error would be something on the lines of what you have observed.


  14. @ Shrini,

    Thanks for your further investigation on the possible boundary of Google's Search box. The thing that struck me the most is how - HTTP GET limit is of 2048 in the browser and how the limit of 2048 could have been imposed by the HTTP GET. I should have taken this point into account while summarizing my findings and predicting the possible boundaries.

    Thanks for sharing the URL: http://www.boutell.com/newfaq/misc/urllength.html. This is a great eye opener of how the actual boundary of Google can get masked if tested with different browsers. I will try to test it with other popular browsers like (Mozilla Firefox and Opera) and probably will write a new post consisting of my findings.

    Thanks for your great insight into the post. Happy Testing...


  15. Hi This is very inteserting topic .
    Yet i also tried testing in different web sites and found yet another thing in google search.

    When we type 2048 characters without any spaces and clicking Search button doesn't shows up anything , even the message Page Cannot be displayed .

  16. I always liked to read the posts along with your comments so that i get better idea abt the post and different testers who read the blog thanks Debasis


  17. i just want to say some thing abt google search not actally realted to BVA.Tody ii was reading pradeeps'blog he was just tell min about a bug in google seach.the same procedure i followed but as a tester i could analyse some thing else whis was not said by pradeep.Isust opened a google search and typed the key word "tester" into the search box it gave me almost 85 pages of result ,I was just moving throug all the pages by clicking the next button to just see throug results ,finally when i reached the 84 th page i clicked the next button.the page wan not moved to the next page but the page says there is a 85 th page.if suppose 84 was the last page the number 85 and the next button should not be found..I dont know if i am correct.I need ur comments on this


  18. @ Rajasri,

    I just tried to retest your observations. In my case, I had left the google's preference unchanged (10 results per page, moderate filtering ON). I entered "tester" (of course without quotes) in the Google Search field and hit enter! It displayed about 77,900,000 for tester, which totalled 78 pages (in contrast to your 84/85 pages). This can be possible due to several reasons (a different preference set in your case, say safe search OFF etc). It can also happen due to the change in Google's search algorithm that takes place continuosly. So I had no way to retest your 84/85 page anomaly! But in my case the last page was the 78th page. I scrolled through the pages (10 pages at a times) until I reached the 77th Page. I could see a Next button (which was logically appropriate). Clicking on the Next button lead me to the last page (78th). But interestingly here I did not see any Next button like you have mentioned. So to me, Google worked as it should have, i.e. No Next button on the last search page. I am attaching a screenshot of it for your reference. Click here for the attached Screenshot I would like you to retest this and come back with your findings.

    Happy Testing...

  19. hi thanks for your reply i have sebd the screen shot of wat i have came across in the google search page.I have send it to ur mail,it may reach u if ur mail id is right debasis_pradhan123@gmail.com.If ur id is wrong pls tell me.Need ur coments on my screen shot


  20. http://www.google.com/search?hl=en&pwst=1&q=tester&start=780&sa=N please try out this link and then click on 79 th page and next


  21. @ Rajasri,

    You have sent the screenshot to an id that does not belong to me! Mine is debasis_pradhan123[AT]yahoo[DOT]co[DOT]in

    Anyway, I have taken a look at your URL! Its really interesting how clicking on the 79th page/Next does not actually take you to the next page (reason! may be no more search result to display!) and simply REFRESHes the page! This is certainly a glitch with Google! I could reproduce it with your same keyword (tester) a few times. But most of the time the total number of search results varied! I tried with other few keywords (random) too! And I did not see this glitch there! So looks like Googles *sometimes* acts in a funny way for some particular keywords (like "tester")! Well, I did not know Google does not like "tester"! :) Jokes apart, may be someone from Google can throw more light on this, in case (s)he is reading this post! Any clue guys?

    NOTE: I have tried this both in IE as well as Firefox 3!


  22. Thanks for ur reply.I think as a tester i was on the right path am I not Debasis?


  23. @ Rajasri,

    Think again when you say you were on the right path while testing! In contrast, they are the WRONG paths that often bring out defects in a system than those of right paths! :)

    I am certainly impressed by the curiosity that you have shown in taking up a testing exercise and I appreciate that. But remember, this is just the beginning! Often complacency turns out to be the biggest career-killer for a person. Try harder. Explore more and experience more. The more you test the more you get better at it.

    A word of Advice: I would like to see you getting better at your written communication (English)! I am not saying you are BAD at it right now. But you can definitely do much better. Watch out for grammatical/spelling errors and try to avoid SMS style writing! They simply look too unprofessional! Personally, I don't mind them. But think of a manager who does not like seeing such things and come across one of your Bug Reports with such writing! As you might already know, good communication skill is an important skill of a good tester. And you want to be a good tester. Don't you? :)

    Happy Testing...

  24. So Google ignored your but, hu? How inconsiderate of them :-)


NOTE: Comments posted on Software Testing Tricks are moderated and will be approved only if they are on-topic. Please avoid comments with spammy URLs. Having trouble leaving comments? Contact Me!