You can import configurable products in Magento 2 by CSV from admin panel.
Log in to admin panel with your credentials.
Go To System -> Data Transfer -> Import
From Entity Type Select Products.
Select Add/Update from Import Behavior settings.
For Import Configurable product using csv, first verify its simple product exist or not in catalog, If child product is not available in catalog, You must create first its child product or Assigned all the child product in CSV before configurable product row.
You are familiar with simple product import. if you dont know how to import simple product please refer link.How to import simple product in Magento 2?
From simple product to configurable product main difference in column are configurable_variations and configurable_variation_labels
Both column is must required to import configurable product.
configurable_variation_labels => size=Size,color=Color
Super attribute code if the configurable product made with multiple attribute keep value with comma separated.
Example, where size, color(lowercase) is attributed code and Size and Color(attribute label)
configurable_variations => It contains the pair of all the child product SKU, super attribute value separated with PIPE(|) operator.
sku=Test Simple 1,size=S,color=Red|sku=Test Simple 2,size=M,color=Blue|sku=Test Simple 3,size=L,color=White|sku=Test Simple 4,size=XL,color=Yellow
Where sku=Test Simple 1,size=S,color=Red (simple product 1 sku and color and size value) for second product we must use pipe(|) operator and set value of second simple product and so on.
Don’t forget to run indexer command,
php bin/magento indexer:reindex
Download Configurable Product Import Sheet.