An ultrasonic flaw detection device, comprising: an ultrasonic probe that detects waveform data of ultrasonic echoes emitted to an inspection area of an inspection target; a processing unit configured to store pieces of sampling data obtained by sampling the waveform data obtained by the ultrasonic probe at predetermined sampling intervals in a storage unit continuously in time series; a display control unit configured to divide the inspection area into a plurality of divided areas and to display each of the plurality of divided areas on a display; a sheet material attachable to a surface of the inspection target and having two-dimensional patterns shown thereon, the two-dimensional patterns being arrangeable on the inspection target and indicating positions on the inspection target; and an imaging device attached to the ultrasonic probe and imaging the two-dimensional patterns; wherein the processing unit is configured to directly or indirectly link a divided area of the plurality of divided areas to one or more waveform data containing sampling data of one or more sampling point included in the divided area; the processing unit is configured to execute an identification process for identifying, for each piece of sampling data, which divided area of the plurality of divided areas a position of the sampling point corresponds to and to directly or indirectly link one or more waveform data containing the sampling data in which the corresponding divided area is identified and the corresponding divided area to each other; and the processing unit is configured to read position information indicating a position on the inspection target from a captured image captured by the imaging device and to relate each piece of sampling data of the waveform data obtained by the ultrasonic probe to the position information read from the captured image obtained at the same time as the waveform data; characterized in that the processing unit is configured to determine an index indicating a degree of quality of the waveform data from the captured image obtained at the same time as the waveform data, to relate the determined index to each piece of sampling data of the waveform data, and when two or more pieces of sampling data correspond to one divided area as a result of the identification process, to select the sampling data having the highest index from the two or more pieces of sampling data. an ultrasonic probe that detects waveform data of ultrasonic echoes emitted to an inspection area of an inspection target; a processing unit configured to store pieces of sampling data obtained by sampling the waveform data obtained by the ultrasonic probe at predetermined sampling intervals in a storage unit continuously in time series; a display control unit configured to divide the inspection area into a plurality of divided areas and to display each of the plurality of divided areas on a display; a sheet material attachable to a surface of the inspection target and having two-dimensional patterns shown thereon, the two-dimensional patterns being arrangeable on the inspection target and indicating positions on the inspection target; and an imaging device attached to the ultrasonic probe and imaging the two-dimensional patterns; wherein the processing unit is configured to directly or indirectly link a divided area of the plurality of divided areas to one or more waveform data containing sampling data of one or more sampling point included in the divided area; the processing unit is configured to execute an identification process for identifying, for each piece of sampling data, which divided area of the plurality of divided areas a position of the sampling point corresponds to and to directly or indirectly link one or more waveform data containing the sampling data in which the corresponding divided area is identified and the corresponding divided area to each other; and the processing unit is configured to read position information indicating a position on the inspection target from a captured image captured by the imaging device and to relate each piece of sampling data of the waveform data obtained by the ultrasonic probe to the position information read from the captured image obtained at the same time as the waveform data; characterized in that the processing unit is configured to determine an index indicating a degree of quality of the waveform data from the captured image obtained at the same time as the waveform data, to relate the determined index to each piece of sampling data of the waveform data, and when two or more pieces of sampling data correspond to one divided area as a result of the identification process, to select the sampling data having the highest index from the two or more pieces of sampling data.