# Find and replace

## Find pane

Most basic find operations in GHex can be done by utilizing the Find pane.

You may toggle the Find pane in the following ways:

- Click the Find button on the header bar.

- Press `Ctrl`+`F`.

In order to easily search for a string in either hex or ASCII format, the Find pane acts like a miniature hex editor. You enter this string in the same way you would edit a file as described in the Editing files section.

To search for the next occurrence of the requested string in the file from the current position of the cursor, click the Find Next button.

To search for the previous occurrence of the requested string in the file from the current position of the cursor, click the Find Previous button.

Your search results will also be automatically highlighted in a different color than the standard selection color.

You may close the Find pane by pressing `Esc` while it is focused, or by clicking its own Close button in the bottom-right-hand corner of the pane.

## Find and Replace pane

The Find and Replace pane works a lot like the Find pane, except that it also allows you to replace the next string, or all strings in the file, with string in the Replace With field.

To replace the next string from the cursor in the Find String field with the string in the Replace With field, click Replace.

To replace all instances in the file of the string in the Find String field with the string in the Replace With field, click Replace All.

In other respects, the Find and Replace pane works as described in the Find pane section above.