Soft x-ray varied line spacing grating (VLSG), which is a vital optical element for laser plasma diagnosis and spectrometry analysis, is conventionally fabricated by holographic lithography or mechanical ruling. In order to overcome the issues of the above fabrication methods, a method based on electron beam lithography-near field lithography (EBL-NFH) is proposed to make good use of the flexibility of EBL and the high throughput of NFH. In this paper, we showed a newly designed soft x-ray VLSG with a central groove density of 3600 lines/mm, which is to be realized based on EBL-NFH. First, the optimization of the spatial distribution of line density and groove profile of the VLSG was shown. As an important element in NFH, a fused silica mask plays a key role during NFH in order to obtain a required line density of VLSG. Therefore, second, the transfer relationship of spatial distribution of line densities between fused silica mask and resist grating was investigated in different exposure modes during NFH. We proposed a formulation about the transfer of line density to design of the groove density distribution of a fused silica grating mask. Finally, the spatial distribution of line densities between the fused silica mask, which is to be fabrication by using EBL, was demonstrated.