You can easily, in just one click add a search box in your WordPress site’s main navigation menu bar. Search box on Navigation Menu lets you do this in a very easy way. All will be needing to do is install and activate it.
Upon activation the plugin adds the default search box on main navigation menu that will save the space and flexibly fit with the menu.