When reinstalling, WhatsApp gives you the option of backing up your chat history, so you can restore them to a new phone.
Steps
Method 1 of 2: Back up chats with iPhone

Step 1. Open WhatsApp
The icon is illustrated by a white telephone in a speech bubble.
If this is your first time launching WhatsApp, you will need to create an account

Step 2. Tap Settings
The button is located at the bottom right of the screen.
- If WhatsApp opens a conversation, press the button Return located at the top left of the screen.

Step 3. Tap Discussions
The option is in the middle of the screen.

Step 4. Tap Save chats
You will find this option towards the middle of the page Conversations.

Step 5. Tap Back Up Now
By doing this, your iPhone will save your chat history to iCloud. If you sign in to WhatsApp with another phone, but with the same phone number, you will be able to retrieve your chat history.
If you haven't turned on iCloud Drive, you'll need to do so before continuing
Method 2 of 2: Back up messages on Android

Step 1. Open WhatsApp
The icon is illustrated by a white telephone in a speech bubble.
If this is your first time launching WhatsApp, you will need to create an account

Step 2. Press ⋮
The button is located at the top right of the screen.
- If WhatsApp opens a conversation, press the button Return located at the top left of the screen.

Step 3. Tap Settings
The button is at the bottom of the drop-down menu that just opened.

Step 4. Select Discussions
The option is in the middle of the screen Settings.

Step 5. Tap Chat Backup
The option is near the bottom of the screen.

Step 6. Press SAVE
This is the green button in the middle of the screen. If you sign in to WhatsApp with another phone, but with the same phone number, you will be able to retrieve your conversation history.
Advice
You should upgrade your storage capacity on iCloud or Google Drive before backing up a large volume of chats
Warnings
- If you save your chats with media files (eg photos), it will be a very large volume and require more time and data. If your phone has a message size restriction, your conversation history backup may be truncated. It may even fail.
- Backing up to the data network may incur additional charges in your telephone bill.